<?php echo $this->doctype('XHTML1_STRICT');?>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Menu | Admin Panel</title>
    <?php echo $this->headLink()->appendStylesheet('/css/back-end/reset.css'); ?> 
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/text.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/grid.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/layout.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/nav.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/list.css','all'); ?>  
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/themes/base/jquery.ui.all.css','all'); ?>
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" media="screen" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="css/ie.css" media="screen" /><![endif]-->
    <!-- BEGIN: load jquery -->
    <?php echo $this->headScript()->appendFile('/js/back-end/jquery-1.6.4.min.js');?>
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.core.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.widget.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.accordion.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.effects.core.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.effects.slide.min.js','text/javascript');?> 
    <!-- END: load jquery -->   
    <!-- END: load jqplot -->
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/setup.js','text/javascript');?>
  <script type="text/javascript">

        $(document).ready(function () {
            setupLeftMenu();

          			setSidebarHeight();


        });
    </script>

</head>
<body>
    <div class="container_12">
        <div class="grid_12 header-repeat">
            <div id="branding">
                <div class="floatleft">
                    <img src="/images/back-end/logo.png" alt="Logo" /></div>
                <div class="floatright">
                    <div class="floatleft">
                        <img src="/images/back-end/img-profile.jpg" alt="Profile Pic" /></div>
                    <div class="floatleft marginleft10">
                        <ul class="inline-ul floatleft">
                            <li>Hello Admin</li>
                            <li><a href="#">Config</a></li>
                            <li><a href="#">Logout</a></li>
                        </ul>
                        <br />
                        <span class="small grey">Last Login: 3 hours ago</span>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="grid_12">
            <ul class="nav main">
                <li class="ic-dashboard"><a href="<?php echo $this->baseUrl();?>/admin/index"><span> Trang chủ </span></a> </li>
                <li class="ic-form-style"><a href="<?php echo $this->baseUrl();?>/admin/menu"><span> Món ăn </span></a> </li>				
                <li class="ic-charts"><a href="<?php echo $this->baseUrl();?>/admin/revenue"><span> Doanh thu </span></a></li>
                <li class="ic-grid-tables"><a href="<?php echo $this->baseUrl();?>/admin/customer"><span> Khách hàng </span></a></li>
                               
            </ul>
        </div>
        <div class="clear">
        </div>
        
        <div class="grid_10">
            <div class="box round first">
                <h2> Danh sách món ăn </h2>
                <?php $listItem = $this->data; ?>
                <div class="block">
                	<table border = "1" width = "100%" cellspacing = "0" cellpadding = "0">
                		<tr class = "headerTable">
                			<th width="9%"> Mã món ăn </th>
                			<th width="13%"> Tên món ăn </th>
                			<th width="14%"> Loại món ăn </th>
                			<th width="30%"> Mô tả </th>
                			<th width="18%"> Hình ảnh </th>
                			<th width="8%"> Gía cả </th>
                            <th width="4%"> Cập nhật </th>
                            <th width="4%"> Xóa bỏ </th>
                		</tr>
	                	<?php
	                		for($i = 0;$i < count($listItem);$i++)
	                		{
		                		echo "<tr>\n";
		                		echo "<td class = \"item_id\"> <div class = \"contentID\"> <input type = \"checkbox\" /> &nbsp;" .$listItem[$i]['item_id'] ."</td>\n";
		                		echo "<td class = \"item_name\"> <div class = \"contentName\">" .$listItem[$i]['item_name']. "</div> </td>\n";
		                		echo "<td class = \"kind\"> <div class = \"contentKind\">" .$listItem[$i]['kind'] ." </div></td>\n";
		                		echo "<td class = \"description\"> <div class = \"contentDescp\">" .$listItem[$i]['description'] ."</div></td>\n";
		                		echo "<td class = \"image\"> <div class = \"contentImg\"> <img src = \"/images/front-end/". $listItem[$i]['images'] ."\" width = \"127\" height = \"70\" /> </div> </td>\n";
		                		echo "<td class = \"price\"> <div class = \"contentPrice\">" .$listItem[$i]['price']. "VNĐ </div> </td>\n";		                		
		                		echo "<td class = \"update\"><a href = \"/admin/edit?item_id=". $listItem[$i]['item_id'] ."\"><img src = \"/images/back-end/edit.png\" /> </a> </td>\n";
		                		echo "<td class = \"update\"><a href = \"/admin/remove?item_id=". $listItem[$i]['item_id'] ."\"><img src = \"/images/back-end/delete.png\" /> </a> </td>\n";
		                		echo "</tr>\n";
		                		
	                		}	                		
	                	?>                		
                	</table>
                	<div id = "btInsert">
                    	<input type = "button" value = "Thêm món" onClick = "window.location ='/admin/add'" />
                    </div>                   
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="clear">
    </div>    
    
</body>
</html>

